<?php


namespace App\Models\MainDB;


use Illuminate\Database\Eloquent\Model;

class ScreenWinner extends Model
{
    protected $table = 'ln_screen_winner';     //数据库内完整表名

    protected $primaryKey = 'id';    //主键名

    public $timestamps = false;

    public function userData()
    {
        return $this->hasOne('App\Models\MainDB\UserData', 'user_id', 'user_id');
    }

    public function activity()
    {
        return $this->hasOne(ScreenActivity::class, 'id', 'activity_id');
    }

    public function userRoom()
    {
        return $this->hasOne(UserRoom::class, 'id', 'room_id');
    }


    public function gift()
    {
        return $this->hasOne(Gift::class, 'id', 'gift_id');
    }
}